﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<%PowerGroup modelpowergroup = v.data("powergroup") as PowerGroup; %>
<%var bllPowerGroupService = new PowerGroupService(); %>
<%List<TypeList> list = v.data("list") as List<TypeList>; %>

<%if (list.Count > 0){ %>
<% foreach (TypeList row in list) { %>
	<div class="infolist" onselectstart="return false;" <%if(row.styleid !=3) {%>title="<%=row.typename %> - #{lng}/<%=row.dirpath %>"<%} %>>
		<table border="0" style="border-collapse:collapse" width="100%" bordercolor="#FFFFFF"<%if (bllPowerGroupService.powercheck("article", "typeedit", modelpowergroup)) { %> ondblClick="javascript:parent.onbotton('<%=row.typename %>_{typemanage_edit_title}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().TypeEdit, row.Id) %>?type=edit&styleid=<%=row.styleid %>&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false,'typeedit<%=row.Id %>',self.frameElement.getAttribute('name'));"<%} %>>
			<tr>
				<td width="3%"><input type="checkbox" name="selectinfoid" value="<%=row.Id %>"></td>
				<td width="6%">
					<input type="hidden" name="infoid" id="infoid" value="<%=row.Id %>">
					<input type="text" name="pid" size="1" value="<%=row.pid %>" class="infoInput" style="width:25px;"  onclick="if(this.value=='<%=row.pid %>'){this.value = '';}else {this.select();}" onblur="if(this.value ==''){this.value ='<%=row.pid %>';}">
				</td>
				<td width="5%"><%=row.Id %></td>
				<td width="22%" id="left" class="padding-left3">
                    <%var str = string.Empty; %>
					<%for (var i = 1; i < row.level + 1; i++) { %><%str += "&nbsp;&nbsp;"; %><%} %><%=str %><%if(row.level >0){ %>├─ <%} %><a target="_blank" class="<%if(row.level==0){ %>infolink04b<%}else{ %>infolink04<%} %>" href="<%=row.glink %>"><%=row.typename %></a></td>
				<td width="8%"><%=row.stylename %></td>
                <%var topid1 = row.topid; %>
                <%if (topid1 == 0)
                  {
                      topid1 = row.Id.ObjectToInt();
                  } %>
				<td width="56%" id="infotype">
					<table border="0" style="border-collapse:collapse" bordercolor="#FFFFFF">
						<tr>
                            <%if(row.styleid<3){ %>
							<td><a class="setedit" onclick="javascript:parent.onbotton('<%=row.typename %>_{typemanage_text_infolist_title}','#{view}?loadfun=articlelist&tid=<%=row.Id %>&mid=<%=row.mid %>&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),true,'typelist<%=row.Id %>',self.frameElement.getAttribute('name'));" id="typelist<%=row.Id %>" href="#body" title="_{typemanage_text_infolist_title}" hidefocus="true">_{viewfield_botton}</a></td>
							<%} %>
                            <%if (bllPowerGroupService.powercheck("article", "typeadd", modelpowergroup)) { %>
							<td class="padding-left3"><a class="setedit2" onclick="javascript:parent.onbotton('<%=row.typename %>_{typemanage_add_title}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().TypeAdd) %>?upid=<%=row.Id %>&lng=<%=row.lng %>&topid=<%=topid1 %>&styleid=1&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false,'typeadd<%=row.Id %>',self.frameElement.getAttribute('name'));" id="typeadd<%=row.Id %>" href="#body" title="<%=row.typename %>_{typemanage_add_title}" hidefocus="true">_{typemanage_add_title}</a></td>
							<td class="padding-left3"><a class="setedit2" onclick="javascript:parent.onbotton('<%=row.typename %>_{typemanage_add_title}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().TypeAdd) %>?upid=<%=row.Id %>&lng=<%=row.lng %>&topid=<%=topid1 %>&styleid=4&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false,'typeadd<%=row.Id %>',self.frameElement.getAttribute('name'));" id="typeadd<%=row.Id %>" href="#body" title="<%=row.typename %>_{typemanage_add_title}" hidefocus="true">_{typemanage_add_title2}</a></td>
							<td class="padding-left3"><a class="setedit2" onclick="javascript:parent.onbotton('<%=row.typename %>_{typemanage_add_title}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().TypeAdd) %>?upid=<%=row.Id %>&lng=<%=row.lng %>&topid=<%=topid1 %>&styleid=3&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false,'typeadd<%=row.Id %>',self.frameElement.getAttribute('name'));" id="typeadd<%=row.Id %>" href="#body" title="<%=row.typename %>_{typemanage_add_title}" hidefocus="true">_{typemanage_add_title3}</a></td>
							<%} %>
							 <%if (bllPowerGroupService.powercheck("article", "typeedit", modelpowergroup)) { %>
							<td class="padding-left3"><a class="setedit" onclick="javascript:parent.onbotton('<%=row.typename %>_{typemanage_edit_title}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().TypeEdit, row.Id) %>?type=edit&styleid=<%=row.styleid %>&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false,'typeedit<%=row.Id %>',self.frameElement.getAttribute('name'));" id="typeedit<%=row.Id %>" href="#body" title="<%=row.typename %>_{typemanage_edit_title}" hidefocus="true">_{setedit_botton}</a></td>
							<%} %>
                            <%if (bllPowerGroupService.powercheck("article", "typeedit", modelpowergroup) && row.styleid < 3) { %>
							<td class="padding-left3"><a class="setedit" onclick="javascript:parent.onbotton('<%=row.typename %>_{typeshift_botton}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().TypeShift, row.Id) %>?styleid=<%=row.styleid %>&type=edit&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false);" href="#body" title="<%=row.typename %>_{typeshift_botton}" hidefocus="true">_{typeshift_botton}</a></td>
							<%} %>
                            <%if (bllPowerGroupService.powercheck("article", "synchro", modelpowergroup) && row.styleid < 3){ %>
							<td class="padding-left3"><a class="setedit2" onclick="javascript:parent.onbotton('_{botton_synchro}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().SynChro, row.Id) %>?freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false);" href="#body" title="_{botton_synchro}" hidefocus="true">_{botton_synchro}</a></td>
							<%} %>
                            <%if (bllPowerGroupService.powercheck("article", "deltype", modelpowergroup)) { %>
							<td class="padding-left3"><a class="setedit" onclick="javascript:submiturl('<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TypeController().DelType, row.Id) %>?freshid='+Math.random(),'#{load}','_{run_ok}','_{run_no}',true,'_{del_messok}','selectform','selectall','check_all');" href="#body" title="_{setdel_botton}" hidefocus="true">_{setdel_botton}</a></td>
							<%} %>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</div>
<%} %>
<%}else{%>
	<div class="infolist">
		<table border="0" style="border-collapse:collapse" width="100%" bordercolor="#FFFFFF">
			<tr>
				<td align="center">_{list_nothing_title}</td>
			</tr>
		</table>
	</div>
<%} %>